package com.example.demo2.mapper;


import com.example.demo2.dao.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StudentMapper {

    @Insert("insert into student(name,age,gender) values(#{name},#{age},#{gender})")
    int insert(Student student);

    @Delete("delete from student where id=#{id}")
    int delete(int id);

    @Update("update student set name=#{name},age=#{age},gender=#{gender} where id = #{id}")
    int update(Student student);

    @Select("select * from student")
    List<Student> selectAllStudent();
}
